<template>
	<view>
		<button @click="goLogin('login')" class="buttonStyle">登录页面</button>
		<button @click="goDetailPage('cityExploration')"class="buttonStyle">城市探索</button>
		<navigator url="/pages/components/newsCard/newsCard">
			<button class="buttonStyle">新闻咨询</button>
		</navigator>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			goLogin() {
			  uni.navigateTo({
			    url: '/pages/login/login'
			  });
			},
			goDetailPage(e) {
				if (typeof e === 'string') {
					uni.navigateTo({
						url: '/pages/tabBar/demospage/' + e + '/' + e
					});
				} else {
					uni.navigateTo({
						url: e.url
					});
				}
			}
			
		}
	}
</script>

<style>
.buttonStyle {
  display: block;
  width: 100%;
  padding: 14px 0;
  margin: 8px 0;
  font-size: 16px;
  color: white;
  background-color: #007aff; /* 蓝色，类似 iOS 风格 */
  border: none;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.buttonStyle:hover {
  background-color: #0056b3;
}

.buttonStyle:active {
  background-color: #00469c;
}
</style>